package com.xiaodimall.beforesys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaodimall.beforesys.pojo.Goods;
import com.xiaodimall.utils.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 16436
* @description 针对表【tb_goods_info(商品表)】的数据库操作Mapper
* @createDate 2022-11-25 17:07:19
* @Entity com.xiaodimall.beforesys.pojo.Goods
*/
public interface GoodsMapper extends BaseMapper<Goods> {

    //批量查询
    List<Goods> selectByPrimaryKeys(List<Long> goodsIds);


    //批量修改订单库存数量
    int updateStockNum(@Param("myShoppingCartItems") List<Goods> myShoppingCartItems);


    //模糊查询并进行排序
    List<Goods> findGoodsListBySearch(PageQueryUtil pageUtil);


    //分页处理
    int getTotalGoodsBySearch(PageQueryUtil pageUtil);
}




